module.exports = function (router) {
  router.get('/say', async (ctx) => {
    ctx.checkQuery('name').notEmpty('name is required!')
    ctx.check()

    const {name} = ctx.query
    const data = {
      message: ctx.$say.hello(name)
    }

    ctx.success(data)
  })
}
